package com.ruoyi.project.erp.attention.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.erp.attention.mapper.ErpAttentionMapper;
import com.ruoyi.project.erp.attention.domain.ErpAttention;
import com.ruoyi.project.erp.attention.service.IErpAttentionService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 提醒Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-10
 */
@Service
public class ErpAttentionServiceImpl implements IErpAttentionService 
{
    @Autowired
    private ErpAttentionMapper erpAttentionMapper;

    /**
     * 查询提醒
     * 
     * @param attentionId 提醒主键
     * @return 提醒
     */
    @Override
    public ErpAttention selectErpAttentionByAttentionId(Long attentionId)
    {
        return erpAttentionMapper.selectErpAttentionByAttentionId(attentionId);
    }

    /**
     * 查询提醒列表
     * 
     * @param erpAttention 提醒
     * @return 提醒
     */
    @Override
    public List<ErpAttention> selectErpAttentionList(ErpAttention erpAttention)
    {
        return erpAttentionMapper.selectErpAttentionList(erpAttention);
    }

    /**
     * 新增提醒
     * 
     * @param erpAttention 提醒
     * @return 结果
     */
    @Override
    public int insertErpAttention(ErpAttention erpAttention)
    {
        return erpAttentionMapper.insertErpAttention(erpAttention);
    }

    /**
     * 修改提醒
     * 
     * @param erpAttention 提醒
     * @return 结果
     */
    @Override
    public int updateErpAttention(ErpAttention erpAttention)
    {
        return erpAttentionMapper.updateErpAttention(erpAttention);
    }

    /**
     * 批量删除提醒
     * 
     * @param attentionIds 需要删除的提醒主键
     * @return 结果
     */
    @Override
    public int deleteErpAttentionByAttentionIds(String attentionIds)
    {
        return erpAttentionMapper.deleteErpAttentionByAttentionIds(Convert.toStrArray(attentionIds));
    }

    /**
     * 删除提醒信息
     * 
     * @param attentionId 提醒主键
     * @return 结果
     */
    @Override
    public int deleteErpAttentionByAttentionId(Long attentionId)
    {
        return erpAttentionMapper.deleteErpAttentionByAttentionId(attentionId);
    }
}
